class Ints(object):
    
    def __init__(self, xn) -> None:
        self.xn = xn
        self.idx = 0
        
    def __iter__(self) -> 'Ints':
        return self
    
    def __next__(self) -> int:
        self.idx += 1
        idx = self.idx
        if idx > self.xn:
            raise StopIteration()
        return self.idx * 10


class Tens(object):
    
    def __init__(self, xn) -> None:
        self.xn = xn

    def __iter__(self) -> Ints:
        return Ints(self.xn)


if '__main__' == __name__:
    
    from PyCmpltrtok.common import sep
    
    sep('Tens')
    obj = Tens(10)        
    for i in obj:
        print(i, end=', ')
    print()
        
    sep('Ints')
    obj = Ints(10)
    for i in obj:
        print(i, end=', ')
    print()
        